package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.UserComment;
import java.util.List;

public interface UserCommentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(UserComment record);

    UserComment selectByPrimaryKey(Long id);

    List<UserComment> selectAll();

    int updateByPrimaryKey(UserComment record);

    List<UserComment> selectByCommentId(Long commentId);

    List<UserComment> listByTravelId(Long travelId);

    //获得别人对我写的游记的评论
    List<UserComment> getTravelCommentByUserId(Long id);
    //获得别人在游记中对我评论的评论
    List<UserComment> getCommentOfTravelCommentByUserId(Long id);
    //获得别人在攻略中对我评论的评论
    List<UserComment> getCommentOfStrategyCommentByUserId(Long id);


    //获得新增的别人对我的游记的评论数
    int getNewCommentOfTravelNumByUserId(Long id);

    //获得新增的别人对我的评论的评论数
    int getNewCommetnNUmOfCommentByUserId(Long id);

    void setTravelToReader(Long id);

    void setCommentToRead(Long id);
}